/**
* Created by ren on 2016/12/23.
*/
<template>
  <div class='goods-wrap product'>
    <div class="title"><i></i><span>商城商品</span><i></i></div>
    <div class="goodses-wrap">
      <div :class="{goods:true,end:index===4}" v-for="(item,index) in goodsData" v-if="index<5">
        <a :href="'goodsdetail/'+item.id" target="_blank">
          <div class="img">
            <img v-lazy="loadImg(item.imgUrl)" alt="">
          </div>
          <div class="name">{{item.shopName}}</div>
          <div class="price">¥{{(item.price/100.0).toFixed(2)}}</div>
        </a>
      </div>
    </div>
  </div>
</template>

<script>
  import API from '../../api'
  export default {
    name: 'banner',
    props: ['goodsData'],
    data: function () {
      return {
        bannerData: []
      }
    },
    methods: {
      loadImg: function (path) {
        return API.path + path
      }
    }
  }
</script>

<style lang="scss">
  @import "../../scss/home.scss";
</style>
